Untyped Memory in the Java Virtual Machine
نویسندگان
چکیده
We have implemented a virtual execution environment that executes legacy binary code on top of the type-safe Java Virtual Machine by recompiling native code instructions to type-safe bytecode. As it is essentially impossible to infer static typing into untyped machine code, our system emulates untyped memory on top of Java’s type system. While this approach allows to execute native code on any off-the-shelf JVM, the resulting runtime performance is poor. We propose a set of virtual machine extensions that add type-unsafe memory objects to JVM. We contend that these JVM extensions do not relax Java’s type system as the same functionality can be achieved in pure Java, albeit much less efficiently. 1 Executing Native Machine Code on top of JVM Our research prototype VEELS (Virtual Execution Environment for Legacy Software) is able to execute statically compiled Linux [2] executables for PowerPC, StrongARM, and MIPS on top of any standard Java Virtual Machine [4]. All native code and data is stored within a memory object that emulates untyped memory. A virtual CPU fetches instructions from the memory object and interprets them. Frequently executed code blocks are translated to bytecode by a just-in-time compiler to allow more efficient execution Figure 1. 2 Emulating Untyped Memory The standard implementation of the memory object in VEELS uses a sparse integer array as backing store. Each 4k page of the guest machine is modeled as an array of integers, referenced by a page table. The most common access patterns—reading and writing words from and to memory at an aligned address—are handled efficiently with two memory accesses and a pair of array bounds checks.
منابع مشابه
Design and Performance Analysis of a Distributed Java Virtual Machine
ÐThis paper introduces DISK, a distributed Java Virtual Machine for networks of heterogenous workstations. Several research issues are addressed. A novelty of the system is its object-based, multiple-writer memory consistency protocol (OMW). The correctness of the protocol and its Java compliance is demonstrated by comparing the nonoperational definitions of Release Consistency, the consistency...
متن کاملMobile Haskell: Compiling Lazy Functional Programs for the Java Virtual Machine
This paper shows how lazy functional programs can be made mobile by compiling them for the Java Virtual Machine. The Haskell compiler it describes is based on the h,Gi-machine, which is designed for implementing lazy functional languages on parallel processors. Although this is not the obvious thing to do, it leads to a particularly elegant set of translation rules. Sadly though, the speed of t...
متن کاملMultiJav: A Distributed Shared Memory System Based on Multiple Java Virtual Machines
Current distributed shared memory systems suuer from portability problems which hinder popularity. We present a distributed shared memory system as a distributed implementation of the Java Virtual Machine. The proposed system is unique in that it provides a user-friendly, exible programming model based on pure Java. It is an object-based memory system which maintains the synchronization scope a...
متن کاملUSENIX Association Proceedings of the Java TM Virtual Machine Research
For the application of Java in realtime and safety critical domains, an analysis of the worst-case execution times of primitive Java operations is necessary. All primitive operations must either execute in constant time or have a reasonable upper bound for their execution time. The difficulties that arise for a Java virtual machine and a Java compiler in this context will be presented here. Thi...
متن کاملThe Design and Implementation of a Java Virtual Machine on a Cluster of Workstations
The Design and Implementation of a Java Virtual Machine on a Cluster of Workstations by Carlos Daniel Cavanna Master of Applied Science Edward S. Rogers Sr. Department of Electrical and Computer Engineering University of Toronto 2003 We present the design, implementation, and evaluation of a Java Virtual Machine (JVM) on a cluster of workstations, which supports shared memory in software. More ...
متن کامل